﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="viewrecordlist.aspx.cs" MasterPageFile="~/Site.master" Inherits="codelist" %>

    <asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">

    <div style="width: 927px; " class="liststly">
        
    <asp:Label ID="Label10" runat=server BackColor="Aqua" Font-Bold="True" Height="25px" 
            style="margin-top: 0px; text-align:center" Width="929px">信息查询</asp:Label>
        <asp:Panel ID="Panel1" runat="server" Width="922px">
         
            <asp:Label ID="Label11" runat="server" Text="员工编号："></asp:Label>
            <asp:TextBox ID="tx_num" runat="server"></asp:TextBox>
            &nbsp;&nbsp;&nbsp;&nbsp;
            <asp:Label ID="Label12" runat="server" Text="员工姓名："></asp:Label>
            <asp:TextBox ID="tx_name" runat="server"></asp:TextBox>
         

            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
         

            <asp:Button ID="bt_recordfind" runat="server" onclick="bt_recordfind_Click" 
                Text="查询" />
 
        </asp:Panel>
    <asp:GridView ID="gv_record" runat="server" AutoGenerateColumns="False" CellPadding="4"

                        ForeColor="#333333"  OnRowCreated="gv_RowCreated"
             DataKeyNames="iStaff_ID" 
            DataSourceID="SqlDataSource1"  ShowFooter ="True" GridLines="None" 
            Width="928px" style="margin-left: 0px" 
            >

                        <EditRowStyle BackColor="#2461BF" />

                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />

                        <AlternatingRowStyle BackColor="White" />

                        <Columns>
                            <asp:BoundField DataField="iStaff_ID" HeaderText="员工编号" 
                                SortExpression="iStaff_ID" >
                            <ItemStyle HorizontalAlign="Center" />
                            </asp:BoundField>
                            <asp:BoundField DataField="sName" HeaderText="姓名" 
                                SortExpression="sName" >
                            <ItemStyle HorizontalAlign="Center" />
                            </asp:BoundField>
                            <asp:BoundField DataField="dBirth" HeaderText="出生年月日" 
                                SortExpression="dBirth" >
                            <HeaderStyle HorizontalAlign="Center" />
                            </asp:BoundField>
                            <asp:BoundField DataField="iSex" HeaderText="姓别" 
                                SortExpression="iSex" >
                            <ItemStyle HorizontalAlign="Center" />
                            </asp:BoundField>
                            <asp:BoundField DataField="cName" HeaderText="文化程度" SortExpression="cName" >

                            

                            <ItemStyle HorizontalAlign="Center" />
                            </asp:BoundField>

                            

                            <asp:BoundField DataField="sHealthy" HeaderText="健康" 
                                SortExpression="sHealthy">
                            <ItemStyle HorizontalAlign="Center" />
                            </asp:BoundField>
                            <asp:BoundField DataField="sPolitics" HeaderText="政治面貌" 
                                SortExpression="sPolitics" >
                            <ItemStyle HorizontalAlign="Center" />
                            </asp:BoundField>
                            <asp:BoundField DataField="dName" HeaderText="部门" SortExpression="dName" >
                            <ItemStyle HorizontalAlign="Center" />
                            </asp:BoundField>
                            <asp:BoundField DataField="pName" HeaderText="职位" SortExpression="pName" >

                            <ItemStyle HorizontalAlign="Center" />
                            </asp:BoundField>

                            <asp:BoundField DataField="sRemark" HeaderText="备注" 
                                SortExpression="sRemark" >

                            <ItemStyle HorizontalAlign="Center" Width="200px" />
                            </asp:BoundField>

                            <asp:TemplateField HeaderText="档案下载">
                               <ItemTemplate>

                                    <asp:LinkButton ID="lbtn_down" runat="server" OnClick="btn_down" >下载</asp:LinkButton>
                                
                              </ItemTemplate>

                               <ItemStyle HorizontalAlign="Center" />
                            </asp:TemplateField>
                            

                        </Columns>

                        <RowStyle BackColor="#EFF3FB" />

                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />

                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />

                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />

                        <SortedAscendingCellStyle BackColor="#F5F7FB" />
                        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                        <SortedDescendingCellStyle BackColor="#E9EBEF" />
                        <SortedDescendingHeaderStyle BackColor="#4870BE" />

                    </asp:GridView>
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:DevMgmntConnectionString %>" 
            SelectCommand="SELECT a.* ,t1.sCultureName cName,t2.sDepartmentName dName,t3.sProfessionaName pName
FROM t_record a left join t_culture t1 on t1.iCulture_ID = a.iCulture_ID 
left join t_department t2 on t2.iDepartment_ID = a.iDepartment_ID 
left join t_professiona t3 on t3.iProfessiona_ID = a.iProfessiona_ID  " >

        </asp:SqlDataSource>

        
                   
    </div>
    </asp:Content>
 
